@(posts: Seq[spray.site.ContentNode], tag: String = "")

<section class="mainContentWrap">
  <div class="container mainContent">
    <div class="row-fluid">

      <div class="span9">
        <div class="row-fluid">
          <div class="innerSpacer section">

            <div class="row-fluid pageTitle">
              <div class="span12"><h1>@{if (tag.isEmpty) "Blog" else s"""Posts with tag "$tag""""}</h1></div>
            </div>

            @posts.map { node =>
              <div class="row-fluid">
                <div class="span12 post">
                  <div class="row-fluid post-content">

                    <div class="row-fluid">
                      <div class="span2">
                        <a href="/@node.uri">
                          <span class="btn btn-inverse">
                            <img src="/img/skin/icon-quote.png" alt="quotation" />
                          </span>
                        </a>
                      </div>
                      <div class="span10 post-title">
                        <h2><a href="/@node.uri">@node.name</a></h2>
                      </div>
                    </div>

                    <div class="row-fluid">
                      <div class="span2 post-meta">
                        <p class="post-date">@node.post.date</p>
                        <p class="tags">@HtmlFormat.raw(node.post.tagLinks)</p>
                        <!-- <p class="comments-num"><a href="#">5<span class="icon-comment"></span></a></p> -->
                      </div>
                      <div class="span10">
                        @node.post.indexParagraphs
                        <p>
                          <a href="/@node.uri"><span class="label">Read More</span></a>&nbsp;&nbsp;&nbsp;
                          <a href="/@node.uri#disqus_thread" class="comment-count"></a>
                        </p>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            }

          </div>
        </div>
      </div>

      @html.blogSidebar()

    </div>
  </div>
</section>

<script type="text/javascript">
var disqus_shortname = 'sprayio';
(function () {
  var s = document.createElement('script'); s.async = true;
  s.type = 'text/javascript';
  s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
  (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>